﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Downloader.Domain;
using Downloader.Domain.QueryParams;
using Downloader.Framework.Queries;
using Downloader.Web.Controllers.ViewModels;

namespace Downloader.Web.Controllers.Queries
{
    public class ArticleQuery : QueryBase, IArticleQuery
    {

        public ArticleContentViewModel GetArticleByUrlName(ArticleQueryParams query)
        {
            return GetList<ArticleContent, ArticleContentViewModel>(query).Data[0];
        }

        public  ArticleImgViewModel GetArticleImgByName(ArticleQueryParams query)
        {
            return GetList<ArticleContent, ArticleImgViewModel>(query).Data[0];
        }
    }
}
